
public class PrintVisitor implements Visitor {
	
	@Override
	public void visit(Employee e) {
		System.out.println(e);
	}
	
	@Override
	public void visit(Boss b) {
		System.out.println(b);
		for (Employee e : b.getSubordinates())
			e.accept(this);
	}
}
